/*
@author: Shizuku
@file: 2022-11-16-practice.go
@time: 2022/11/16 18:16
*/
package main

import (
	"fmt"
	"math/rand"
	"time"
)

func main()  {
	gift()
}

func plt(n int) (result int){
	if n == 1 || n == 2{
		return n
	}
	return plt(n-1) + plt(n-2)
}

func gift()  {
	rand.Seed(time.Now().UnixNano())
	Loop:
		hold := map[string]string{
			"A":"a", "B":"b", "C":"c", "D":"d", "E":"e",
		}
		gift := []string{"a", "b", "c", "d", "e"}
		for k,_:=range hold{
			n := rand.Intn(len(gift))
			send := gift[n]
			if send !=hold[k]{
				gift = append(gift[:n], gift[n+1:]...)
				hold[k] = send
			} else {
				continue
			}
		}
	if len(gift) == 0 {
		fmt.Println(hold)
	} else {
		goto Loop
	}
}
